'use strict';

const { Controller } = require('egg');

class LiveController extends Controller {
    //   async index() {
    //     const { ctx } = this;
    //     ctx.body = 'hi, egg';
    //   }
    
    // 获取直播数据
    async live() {
        const { ctx } = this;
        let res = await this.service.live.getLiveList();
        if (res.status) {
            ctx.body = {
                code: res.code,
                message: res.message,
                data: res.data
            }
        } else {
            ctx.body = {
                code: res.code,
                message: res.message,
                data: res.data
            }
        }
    }
}

module.exports = LiveController;